package com.wei800.turnover.config.mybatis.generator;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import com.wei800.common.util.SnowFlakeUtils;
import org.springframework.stereotype.Component;

@Component
public class SnowFlakeIdGenerator implements IdentifierGenerator { // 雪花ID生成器
    @Override
    public Number nextId(Object entity) { // 获取ID数据
        return SnowFlakeUtils.getId();
    }

}
